//
//  BrandFindTableViewCell.m
//  CarFace
//
//  Created by dlios on 15-3-24.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "BrandFindTableViewCell.h"

@implementation BrandFindTableViewCell

- (void)dealloc
{
    [_brandLogo release];
    [_brandName release];
    [_info release];
    [super dealloc];
    
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.brandLogo = [[UIImageView alloc]init];
        [self.contentView addSubview:self.brandLogo];
        [_brandLogo release];
        
        self.brandName = [[UILabel alloc]init];
        [self.contentView addSubview:self.brandName];
        [_brandName release];
        
        
    }
    
    return self;
    
}



- (void)layoutSubviews
{
    [super layoutSubviews];
    //设置汽车logo位置
    self.brandLogo.frame = CGRectMake(10, 10, self.contentView.frame.size.width/8, self.contentView.frame.size.height - 20);
    //设置汽车logo背景色
    self.brandLogo.backgroundColor = [UIColor yellowColor];
    
    
    
    //设置汽车名称位置
    self.brandName.frame = CGRectMake(self.contentView.frame.size.width/8 + 10 + 10, 10, self.contentView.frame.size.width - self.contentView.frame.size.width/8 - 10 - 10, self.contentView.frame.size.height - 20);
    //设置汽车名称背景色
    self.brandName.backgroundColor = [UIColor greenColor];
    
    //赋值
    NSString *str =  self.info.name;
    self.brandName.text = str;
    
    
    
}








- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
